<?php
namespace app\admin\validate;
use think\Validate;
class RbacVerify extends Validate{
  protected $rule = [
        'role_id'  =>  'require|number',
        'user_id' =>  'require|number',
        'id' =>  'require|number',
        'username' =>  'require',
        'email' =>  'require|email',
        'password' =>'require',
        // 'verify'=>'require|captcha',
        'verify'=>'require|captcha',
        'article_id'=>'require|email',
    ];
    
    protected $message = [
        'title'  =>  '标题必须',
        'content' =>  '内容必须',
        'id' =>  'id必须为数字',
        'username' =>  '用户名必须',
        'email' =>  'email格式有误',
        'password' =>  '密码必须',
        'verify' =>  '验证码必须',
        'article_id' =>  '文章ID必须为数字',
    ];
    
    protected $scene = [
        'upRole'   =>  ['role_id','user_id'],
        'addRole'   =>  ['role_id','username','password','email'],
        'dele'     =>  ['id'],
        'update'  =>  ['id','title','content'],
        'regist'  =>  ['user_name','UserEmail','UserPassward'],
        'login'  =>  ['user_name','verify','UserPassward'],
        'issue'=>[''],
    ];
}